import axios from 'axios' //axiox封装
// index： 主页 = /index, 登录注册 = /
const type = (index, params = {}) => {
    return new Promise((reslove, reject) => {
        // http://www.liberation:1314/index.php/admin/index
        axios.get('http://liberation.studentyuan.top/admin/index' + index, { params })
            .then(res => {
                reslove(res);
            })
            .catch(err => {
                reject(err)
            })
    })
}

export default {
    type,
}